#!/bin/bash
echo "package shapes;" > "$1.java"
echo "" >> "$1.java"
echo "import java.awt.Color;" >> "$1.java"
echo "import java.awt.Graphics2D;" >> "$1.java"
echo "import SharedDrawing.WgContent;" >> "$1.java"
echo "import java.util.ArrayList;" >> "$1.java"
echo "import javax.swing.JPanel;" >> "$1.java"
echo "import common.XmlConstants;" >> "$1.java"
echo "import primitives.P_Ellipse;" >> "$1.java"
echo "import primitives.P_Line;" >> "$1.java"
echo "import SharedDrawing.FourCornersShape;">> "$1.java"
echo "/*
 * add your custom imports here
 */" >> "$1.java"

echo "" >> "$1.java"
case $2 in 
4) corners="FourCornersShape"
init=""
;;
2) corners="TwoCornersShape"
init="initTwoCornersShape(x, y);"
;;
*) corners="FourCornersShape"
;;
esac

echo "public class $1 extends $corners
{
	/*
	 * Add your primitive attributes here
	 */
	
	public $1()
	{
        /*
		 * add your custom code here
		 */
	}
	
	@Override
	public void initShape(JPanel container, int x, int y, int width, boolean fill, Color color, Color border) 
	{
		/*
		 * add your custom code here
		 */
	}
	
	@Override
	public void addToPanel()
	{
		/*
		 * add your custom code here
		 */
	}

	@Override
	public void removeFromPanel()
	{
		/*
		 * add your custom code here
		 */
	}
	
	@Override
	protected void setElementsId()
	{
        /*
		 * add your custom code here
		 */
	}
	
	@Override
	public void drawComponent(Graphics2D g2)
	{
        /*
		 * add your custom code here
		 */
	}
	
	@Override
	public boolean isOverObject(int x, int y)
	{
        /*
		 * add your custom code here
		 */
	}

	@Override
	public void setShape() 
	{
		/*
		 * add your custom code here
		 */
	}
	
	@Override
    public ShapeContent primitiveToShapeContent()
    {
        /*
		 * add your custom code here
		 */
    }

    @Override
    public void primitiveFromShapeContent(ShapeContent shapeContent)
    {
        /*
		 * add your custom code here
		 */
    }
}
" >> "$1.java"

